package com.youjia.center.boot.data.mp.basic.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * lock entity 基本实体类
 * @author fengjiansong
 * @date 2022/1/17 4:08 下午
 */
@Data
public class BaseVersionEntity implements Serializable {

    @TableId(type = IdType.AUTO)
    @OrderBy
    private Long id;

    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @TableField(fill = FieldFill.INSERT)
    private String createBy;

    @TableField(fill = FieldFill.UPDATE)
    private Date updateTime;

    @TableField(fill = FieldFill.UPDATE)
    private String updateBy;

    @TableLogic(value = "false",delval = "true")
    @TableField(fill = FieldFill.INSERT)
    private Boolean deleteFlag;

    @Version
    @TableField(fill = FieldFill.INSERT)
    private Long lockVersion;
}
